#ifndef _GUI_H_
#define _GUI_H_

#include "util/fontstash.h"

typedef struct _GUI{

	int widgetShader;
	
	unsigned int  setupList;
	unsigned int  restoreList;

	int w, h;

	int hotitem;
	int activeitem;

	int focusx, focusy;
	int twophase;

	int kbditem;
	int keyentered;
	int keymod;
	int lastwidget;

	struct font_stash* stash;

	float widgetColor[4][4];
	float borderColor[4][4];
	float fontColor[4][4];
}GUI;

int initializeGUI(int w, int h);
void beginGUI(event *e);
void endGUI();

int doButton(int id, rect* r, char* text);
int doHorizontalSlider(int id, rect* r, float* value);
int doVerticalSlider(int id, rect* r, float* value);
int doRadioButton(int id, rect* r, char* text, int *state);
int doCheckButton(int id, rect  *r, char* text, int * state);

#endif

